const fs = require("fs");
const Router = require("koa-router");
const router = new Router();

const file = fs.readdirSync(__dirname);

file.forEach((item) => {
  if (item !== "index.js") {
    let r = require("./" + item);
    router.use(r.routes());
  }
});

module.exports = router;
